/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the
 * License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
/**
 * Nudr_DataRepository API OpenAPI file
 * Unified Data Repository Service. © 2020, 3GPP Organizational Partners (ARIB,
 * ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
 *
 * The version of the OpenAPI document: 2.1.2
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator
 * (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
 * the class manually.
 */

#include "WirelineArea.h"

namespace oai::udr::model {

WirelineArea::WirelineArea() {
  m_GlobalLineIdsIsSet = false;
  m_HfcNIdsIsSet = false;
  m_AreaCodeB = "";
  m_AreaCodeBIsSet = false;
  m_AreaCodeC = "";
  m_AreaCodeCIsSet = false;
}

WirelineArea::~WirelineArea() {}

void WirelineArea::validate() {
  // TODO: implement validation
}

void to_json(nlohmann::json &j, const WirelineArea &o) {
  j = nlohmann::json();
  if (o.globalLineIdsIsSet() || !o.m_GlobalLineIds.empty())
    j["globalLineIds"] = o.m_GlobalLineIds;
  if (o.hfcNIdsIsSet() || !o.m_HfcNIds.empty())
    j["hfcNIds"] = o.m_HfcNIds;
  if (o.areaCodeBIsSet())
    j["areaCodeB"] = o.m_AreaCodeB;
  if (o.areaCodeCIsSet())
    j["areaCodeC"] = o.m_AreaCodeC;
}

void from_json(const nlohmann::json &j, WirelineArea &o) {
  if (j.find("globalLineIds") != j.end()) {
    j.at("globalLineIds").get_to(o.m_GlobalLineIds);
    o.m_GlobalLineIdsIsSet = true;
  }
  if (j.find("hfcNIds") != j.end()) {
    j.at("hfcNIds").get_to(o.m_HfcNIds);
    o.m_HfcNIdsIsSet = true;
  }
  if (j.find("areaCodeB") != j.end()) {
    j.at("areaCodeB").get_to(o.m_AreaCodeB);
    o.m_AreaCodeBIsSet = true;
  }
  if (j.find("areaCodeC") != j.end()) {
    j.at("areaCodeC").get_to(o.m_AreaCodeC);
    o.m_AreaCodeCIsSet = true;
  }
}

std::vector<std::string> &WirelineArea::getGlobalLineIds() {
  return m_GlobalLineIds;
}
void WirelineArea::setGlobalLineIds(std::vector<std::string> const &value) {
  m_GlobalLineIds = value;
  m_GlobalLineIdsIsSet = true;
}
bool WirelineArea::globalLineIdsIsSet() const { return m_GlobalLineIdsIsSet; }
void WirelineArea::unsetGlobalLineIds() { m_GlobalLineIdsIsSet = false; }
std::vector<std::string> &WirelineArea::getHfcNIds() { return m_HfcNIds; }
void WirelineArea::setHfcNIds(std::vector<std::string> const &value) {
  m_HfcNIds = value;
  m_HfcNIdsIsSet = true;
}
bool WirelineArea::hfcNIdsIsSet() const { return m_HfcNIdsIsSet; }
void WirelineArea::unsetHfcNIds() { m_HfcNIdsIsSet = false; }
std::string WirelineArea::getAreaCodeB() const { return m_AreaCodeB; }
void WirelineArea::setAreaCodeB(std::string const &value) {
  m_AreaCodeB = value;
  m_AreaCodeBIsSet = true;
}
bool WirelineArea::areaCodeBIsSet() const { return m_AreaCodeBIsSet; }
void WirelineArea::unsetAreaCodeB() { m_AreaCodeBIsSet = false; }
std::string WirelineArea::getAreaCodeC() const { return m_AreaCodeC; }
void WirelineArea::setAreaCodeC(std::string const &value) {
  m_AreaCodeC = value;
  m_AreaCodeCIsSet = true;
}
bool WirelineArea::areaCodeCIsSet() const { return m_AreaCodeCIsSet; }
void WirelineArea::unsetAreaCodeC() { m_AreaCodeCIsSet = false; }

} // namespace oai::udr::model
